package com.jin.webvideo.videoCache.policy.condition;

/**
 * 双目运算符抽象类
 * @param <T>
 */
public abstract class BinocularCondition<T> implements Condition<T>{
    private Condition<T> condition;
    private Condition<T> condition2;
    public BinocularCondition(Condition<T> c1, Condition<T> c2){
        this.condition = c1;
        this.condition2 = c2;
    }
    public abstract boolean compute(Condition<T> c1, Condition<T> c2, T data);
    @Override
    public boolean compute(T t) {
        return compute(condition, condition2, t);
    }
}
